﻿using System;
using System.Collections.Generic;
using System.Text;

namespace DotPowerJob.Responses
{
    public class InstanceDetailResponse
    {
        public long ExpectedTriggerTime { get; set; }

        public long ActualTriggerTime { get; set; }

        public long FinishedTime { get; set; }

        public int Status { get; set; }

        public string Result { get; set; }

        public string TaskTrackerAddress { get; set; }

        public string JobParams { get; set; }

        public string InstanceParams { get; set; }

        public TaskDetail TaskDetail { get; set; }

        public List<TaskDetailInfo> QueriedTaskDetailInfoList { get; set; }

        public List<SubInstanceDetail> SubInstanceDetails { get; set; }

        public long RunningTimes { get; set; }

        public string Extra { get; set; }
    }

    public class SubInstanceDetail
    {
        public long SubInstanceId { get; set; }

        public long StartTime { get; set; }

        public long FinishedTime { get; set; }

        public string Result { get; set; }

        public int Status { get; set; }
    }

    public class TaskDetail
    {
        public long TotalTaskNum { get; set; }

        public long SucceedTaskNum { get; set; }

        public long FailedTaskNum { get; set; }

        public long WaitingDispatchTaskNum { get; set; }

        public long WorkerUnreceivedTaskNum { get; set; }

        public long ReceivedTaskNum { get; set; }

        public long RunningTaskNum { get; set; }
    }

    public class TaskDetailInfo
    {
        public string TaskId { get; set; }

        public string TaskName { get; set; }

        public string TaskContent { get; set; }

        public string ProcessorAddress { get; set; }

        public int Status { get; set; }

        public string StatusStr { get; set; }

        public string Result { get; set; }

        public int FailedCnt { get; set; }

        public long CreatedTime { get; set; }

        public long LastModifiedTime { get; set; }

        public long LastReportTime { get; set; }
    }
}
